# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer
pkgname=pcc-libs
pkgver=20191221
pkgrel=0
pkgdesc="The portable C compiler support libraries."
url="http://pcc.ludd.ltu.se/"
arch="x86 x86_64"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="ftp://pcc.ludd.ltu.se/pub/$pkgname/pcc-libs-$pkgver.tgz
	musl-fixes.patch"

builddir="$srcdir/"$pkgname-$pkgver
prepare() {
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="a9357825acea2b2cb58094fa825a0069c7560eb254fa4f6d13a7269cae8cce2a94dcf968a53f34030338f98f90aabb5b18be1201c14ad5e5415de17be61a845e  pcc-libs-20191221.tgz
fd8c71cd583c6be29553f2b7e6ce66073afd6d0406ae86f6fbb6a36efe8685be4732d2989180a9b31af734cc9a0973c1c731472f02bad076121f6c3c58391fc4  musl-fixes.patch"
